using MicroMsg.UI.Page;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class AlbumPrivateCtrl : UserControl
	{
		public enum CtrlKind
		{
			Kind_None,
			Kind_Private,
			Kind_VisiRange
		}
		private AlbumPrivateCtrl.CtrlKind mCtrlKind;
		internal StackPanel LayoutRoot;
		internal Image privateIcon;
		private bool _contentLoaded;
		public AlbumPrivateCtrl()
		{
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.AlbumPrivateCtrl_Loaded));
		}
		public void SetImgKind(AlbumPrivateCtrl.CtrlKind kind)
		{
			if (this.mCtrlKind == kind)
			{
				return;
			}
			this.mCtrlKind = kind;
			this.refreshImg();
		}
		private void refreshImg()
		{
			if (this.mCtrlKind == AlbumPrivateCtrl.CtrlKind.Kind_Private)
			{
				this.privateIcon.set_Source(new ImageSourceConverter().ConvertFromString(R.theme.Sns_ImgPath_Userpage_Private) as ImageSource);
				return;
			}
			if (this.mCtrlKind == AlbumPrivateCtrl.CtrlKind.Kind_VisiRange)
			{
				this.privateIcon.set_Source(new ImageSourceConverter().ConvertFromString(R.theme.Sns_Brush_VisiRange) as ImageSource);
				return;
			}
			this.privateIcon.set_Source(null);
		}
		private void AlbumPrivateCtrl_Loaded(object sender, RoutedEventArgs e)
		{
			this.refreshImg();
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Album/UI/AlbumPrivateCtrl.xaml", 2));
			this.LayoutRoot = (StackPanel)base.FindName("LayoutRoot");
			this.privateIcon = (Image)base.FindName("privateIcon");
		}
	}
}
